﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Input;

namespace SecureRemoteControlServer
{
    internal class RoutedUICommand : System.Windows.Input.RoutedUICommand
    {
        /// <summary>
        /// 快捷键
        /// </summary>
        public KeyGesture Gesture
        {
            set
            {
                Console.WriteLine("Gesture.set");
                base.InputGestures.Add(value);
            }
        }

        /// <summary>
        /// 快捷键集合
        /// </summary>
        public InputGestureCollection Gestures
        {
            get
            {
                Console.WriteLine("Gestures.get");
                return base.InputGestures;
            }
        }

        /// <summary>
        /// 快捷键集合文本
        /// </summary>
        public String InputGestureText
        {
            get
            {
                return String.Join(", ", base.InputGestures.Cast<KeyGesture>().Select(v => new KeyGestureConverter().ConvertToString(v)));
            }
        }
    }
}
